package cn.lyw.discount.utils;

import cn.common.init.InitDataConstant;
import cn.common.redis.RedisServie;
import cn.lyw.discount.mapper.pojo.SmallMiAdminDiscount;
import cn.lyw.discount.service.service.UserDiscountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Map;
import java.util.Set;

/**
 * @Author lyw
 * @Description 优惠券抽奖池
 * @Date 9:10 2021/7/22
 * @Param
 * @return
 */
@Service
public class DiscountPond {

    @Autowired
    private RedisServie redisServie;

    @Autowired
    private UserDiscountService userDiscountService;


    /**
     * @return
     * @Author lyw
     * @Description 用户领取优惠券
     * @Date 9:13 2021/7/22
     * @Param
     */
    public void UserGetDiscount() {

        //从redis中将活动中的优惠券取出
        Map hashAll = redisServie.getHashAll(InitDataConstant.DISCOUNT_ACTIVITY_KEY, SmallMiAdminDiscount.class);

    }

}
